
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>
    <meta http-equiv="Content-Type"
          content="text/html; charset=UTF8" />
    <title></title>
    <style type="text/css">
        table.diff {font-family:Courier; border:medium;}
        .diff_header {background-color:#e0e0e0}
        td.diff_header {text-align:right}
        .diff_next {background-color:#c0c0c0}
        .diff_add {background-color:#aaffaa}
        .diff_chg {background-color:#ffff77}
        .diff_sub {background-color:#ffaaaa}
    </style>
</head>

<body>
    
    <table class="diff" id="difflib_chg_to1__top"
           cellspacing="0" cellpadding="0" rules="groups" >
        <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
        <colgroup></colgroup> <colgroup></colgroup> <colgroup></colgroup>
        
        <tbody>
            <tr><td class="diff_next"><a href="#difflib_chg_to1__top">t</a></td><td class="diff_header" id="from1_1">1</td><td nowrap="nowrap">#!/usr/lib/python</td><td class="diff_next"><a href="#difflib_chg_to1__top">t</a></td><td class="diff_header" id="to1_1">1</td><td nowrap="nowrap">#!/usr/lib/python</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_2">2</td><td nowrap="nowrap">#coding=utf-8</td><td class="diff_next"></td><td class="diff_header" id="to1_2">2</td><td nowrap="nowrap">#coding=utf-8</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_3">3</td><td nowrap="nowrap">import&nbsp;difflib</td><td class="diff_next"></td><td class="diff_header" id="to1_3">3</td><td nowrap="nowrap">import&nbsp;difflib</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_4">4</td><td nowrap="nowrap">text1="""text1:&nbsp;#定义字符串&nbsp;1&nbsp;</td><td class="diff_next"></td><td class="diff_header" id="to1_4">4</td><td nowrap="nowrap">text1="""text1:&nbsp;#定义字符串&nbsp;1&nbsp;</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_5">5</td><td nowrap="nowrap">This&nbsp;module&nbsp;provides&nbsp;classes&nbsp;and&nbsp;functions&nbsp;for&nbsp;comparing&nbsp;sequences.</td><td class="diff_next"></td><td class="diff_header" id="to1_5">5</td><td nowrap="nowrap">This&nbsp;module&nbsp;provides&nbsp;classes&nbsp;and&nbsp;functions&nbsp;for&nbsp;comparing&nbsp;sequences.</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_6">6</td><td nowrap="nowrap">including&nbsp;HTML&nbsp;and&nbsp;context&nbsp;and&nbsp;unified&nbsp;diffs.</td><td class="diff_next"></td><td class="diff_header" id="to1_6">6</td><td nowrap="nowrap">including&nbsp;HTML&nbsp;and&nbsp;context&nbsp;and&nbsp;unified&nbsp;diffs.</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_7">7</td><td nowrap="nowrap">difflib&nbsp;document&nbsp;v7.4</td><td class="diff_next"></td><td class="diff_header" id="to1_7">7</td><td nowrap="nowrap">difflib&nbsp;document&nbsp;v7.4</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_8">8</td><td nowrap="nowrap">add&nbsp;string</td><td class="diff_next"></td><td class="diff_header" id="to1_8">8</td><td nowrap="nowrap">add&nbsp;string</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_9">9</td><td nowrap="nowrap">"""</td><td class="diff_next"></td><td class="diff_header" id="to1_9">9</td><td nowrap="nowrap">"""</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_10">10</td><td nowrap="nowrap">text1_lines&nbsp;=&nbsp;text1.splitlines()&nbsp;#以行进行分割，以便进行对比</td><td class="diff_next"></td><td class="diff_header" id="to1_10">10</td><td nowrap="nowrap">text1_lines&nbsp;=&nbsp;text1.splitlines()&nbsp;#以行进行分割，以便进行对比</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_11">11</td><td nowrap="nowrap">text2="""text2:&nbsp;#定义字符串2</td><td class="diff_next"></td><td class="diff_header" id="to1_11">11</td><td nowrap="nowrap">text2="""text2:&nbsp;#定义字符串2</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_12">12</td><td nowrap="nowrap">This&nbsp;module&nbsp;provides&nbsp;classes&nbsp;and&nbsp;functions&nbsp;for&nbsp;Comparing&nbsp;sequences.</td><td class="diff_next"></td><td class="diff_header" id="to1_12">12</td><td nowrap="nowrap">This&nbsp;module&nbsp;provides&nbsp;classes&nbsp;and&nbsp;functions&nbsp;for&nbsp;Comparing&nbsp;sequences.</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_13">13</td><td nowrap="nowrap">including&nbsp;HTML&nbsp;and&nbsp;context&nbsp;and&nbsp;unified&nbsp;diffs.</td><td class="diff_next"></td><td class="diff_header" id="to1_13">13</td><td nowrap="nowrap">including&nbsp;HTML&nbsp;and&nbsp;context&nbsp;and&nbsp;unified&nbsp;diffs.</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_14">14</td><td nowrap="nowrap">difflib&nbsp;document&nbsp;v7.5"""&nbsp;</td><td class="diff_next"></td><td class="diff_header" id="to1_14">14</td><td nowrap="nowrap">difflib&nbsp;document&nbsp;v7.5"""&nbsp;</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_15">15</td><td nowrap="nowrap">text2_lines=text2.splitlines()</td><td class="diff_next"></td><td class="diff_header" id="to1_15">15</td><td nowrap="nowrap">text2_lines=text2.splitlines()</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_16">16</td><td nowrap="nowrap">d=difflib.Differ()</td><td class="diff_next"></td><td class="diff_header" id="to1_16">16</td><td nowrap="nowrap">d=difflib.Differ()</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_17">17</td><td nowrap="nowrap">diff=d.compare(text1_lines,text2_lines)</td><td class="diff_next"></td><td class="diff_header" id="to1_17">17</td><td nowrap="nowrap">diff=d.compare(text1_lines,text2_lines)</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_18">18</td><td nowrap="nowrap">d=difflib.HtmlDiff()</td><td class="diff_next"></td><td class="diff_header" id="to1_18">18</td><td nowrap="nowrap">d=difflib.HtmlDiff()</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_19">19</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_19">19</td><td nowrap="nowrap"></td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_20">20</td><td nowrap="nowrap">print&nbsp;'\n'.join(list(diff))</td><td class="diff_next"></td><td class="diff_header" id="to1_20">20</td><td nowrap="nowrap">print&nbsp;'\n'.join(list(diff))</td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_21">21</td><td nowrap="nowrap"></td><td class="diff_next"></td><td class="diff_header" id="to1_21">21</td><td nowrap="nowrap"></td></tr>
            <tr><td class="diff_next"></td><td class="diff_header" id="from1_22">22</td><td nowrap="nowrap">print&nbsp;d.make_file(text1_lines,text2_lines)</td><td class="diff_next"></td><td class="diff_header" id="to1_22">22</td><td nowrap="nowrap">print&nbsp;d.make_file(text1_lines,text2_lines)</td></tr>
        </tbody>
    </table>
    <table class="diff" summary="Legends">
        <tr> <th colspan="2"> Legends </th> </tr>
        <tr> <td> <table border="" summary="Colors">
                      <tr><th> Colors </th> </tr>
                      <tr><td class="diff_add">&nbsp;Added&nbsp;</td></tr>
                      <tr><td class="diff_chg">Changed</td> </tr>
                      <tr><td class="diff_sub">Deleted</td> </tr>
                  </table></td>
             <td> <table border="" summary="Links">
                      <tr><th colspan="2"> Links </th> </tr>
                      <tr><td>(f)irst change</td> </tr>
                      <tr><td>(n)ext change</td> </tr>
                      <tr><td>(t)op</td> </tr>
                  </table></td> </tr>
    </table>
</body>

</html>